<template>
  <div class="body">
    <el-form class="loginContainer">
      <h3 class="loginTitle">
        平台登录
      </h3>
      <el-form-item>
        <el-input type="text" v-model="user.platformAccount" placeholder="请输入用户名">
        </el-input>
      </el-form-item>
      <el-form-item>
        <el-input type="password" v-model="user.platformPass" placeholder="请输入密码">
        </el-input>
      </el-form-item>
      <!-- <el-checkbox class="loginRemember">记住我</el-checkbox> -->
      <el-row>
        <el-col>
          <el-button @click="login" type="primary" style="width:100%">登录</el-button>
        </el-col>
      </el-row>
      <el-row>
        <el-col>
          <el-button @click="back" style="width:100%;margin-top: 20px;">返回</el-button>
        </el-col>
      </el-row>
      <div class="registerLink">
        还没有账号？<a href="#/PlatformRegister" class="registerButton">立即注册</a>
      </div>
    </el-form>
  </div>
</template>
  
<script>
export default {
  name: "PlatformLogin",
  data() {
    return {
      user: {
        platformAccount: "",
        platformPass: ""
      }

    }
  },
  methods: {
    back() {
      this.$router.push("/first")
    },
    login() {
      this.$http.post("/platform/platformAccount/paltformlogin", this.user).then(resp => {
        alert(resp.data.message)
        if (resp.data.code == 200) {
          this.$router.push("/PlatformIndex")
        }
      })
    },

  }
}
</script>
  
<style>
.loginContainer {
  border-radius: 15px;
  background-clip: padding-box;
  text-align: left;
  margin: auto;
  margin-top: 180px;
  width: 350px;
  padding: 15px 35px 15px 35px;
  background: aliceblue;
  border: 1px solid blueviolet;
  box-shadow: 0 0 25px #55aaff;
  margin-right: 100px;
}

.loginTitle {
  margin: 0px auto 48px auto;
  text-align: center;
  font-size: 40px;
}

.loginRemember {
  text-align: left;
  margin: 0px 0px 15px 0px;
}

.body {
  margin-top: -100px;
  width: 100vw;
  height: 100vh;
  background-image: url("../../static/images/system/33.jpg");
  background-size: 100%;
  overflow: hidden;
}

.registerLink {
  text-align: center;
  margin-top: 10px;
}

.registerLink a {
  color: blue;
}
</style>
  